package com.weds.edpf.core.mapper;

import com.weds.core.annotation.MyBatisDao;
import com.weds.edpf.core.entity.DepEntity;

import java.util.List;


/**
 * @Author zcz
 * @Description 管理
 * @Date 2018-12-13
 */
@MyBatisDao
public interface DepMapper {
    /**
     * 主键删除
     * @param depSerial
     * @return
     */
    int deleteByPrimaryKey(Long depSerial);

    /**
     * 新增
     * @param record
     * @return
     */
    int insert(DepEntity record);

    /**
     * 条件新增
     * @param record
     * @return
     */
    int insertSelective(DepEntity record);

    /**
     * 主键查询
     * @param depSerial
     * @return
     */
    DepEntity selectByPrimaryKey(Long depSerial);

    /**
     * 条件更新
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(DepEntity record);

    /**
     * 主键更新
     * @param record
     * @return
     */
    int updateByPrimaryKey(DepEntity record);

    /**
     * 查询列表
     * @param record
     * @return
     */
    List<DepEntity> selectListByEntity(DepEntity record);

    List<DepEntity> selectDeptUserNums(Integer depParentNo);

    List<DepEntity> selectOrgTree(Integer depParentNo);

    List<DepEntity> selectOrgTreeLazy(Integer depParentNo);

    int countDepByParent(Integer depParentNo);

    DepEntity getRootDir();

    List<DepEntity> selectListMorethanOrder(Integer depParentNo,Integer depOrder);

    int updateDepNoPrimaryKey(DepEntity record);


    List<DepEntity> selectListByDepParent(Integer depParentNo);


    List<DepEntity> selectListBetwweenOrder(Integer depParentNo,Integer order1,Integer order2);

}